This plugin can be used to send and receive information from other
applications. It can send window messages to other applications and show the
result. The plugin can be used for example to control Winamp or some similar
media players.
WindowName
The name of the window. This is used to identify
the window. It's not necessary to set this if the WindowClass is set.
WindowClass
The class of the window. This is used to identify
the window. It's not necessary to set this if the WindowName is set.
WindowMessage
This is the message to be send to the window. You
need to define 3 parameters to where the first one is the message and the next
ones are wParam and lParam. The values are unsigned decimal integers. The
measure returns the value returned by the SendMessage()-function. If the
WindowMessage is not given the measure returns the window's current title.
It's also possible to send messages to applications with
!RainmeterPluginBang. The arguments are similar as in WindowMessages. You need
to define the name of the measure (this identifies the window), "SendMessage",
the message number and wParam and lParam. See examples below.
Examples
This returns the name of the song that is playing in Winamp.
[MeasureWinamp]
Measure=Plugin
Plugin=Plugins\WindowMessagePlugin.dll
WindowClass=Winamp v1.x
Substitute="[Paused]":""," - Winamp":""
Check if Winamp is playing, or not. This returns 0 if it's not playing,
1 if it is playing and 3 if it's paused.
[MeasureWinampPlaying]
Measure=Plugin
Plugin=Plugins\WindowMessagePlugin.dll
WindowClass=Winamp v1.x
WindowMessage=1024 0 104
Show song progress. The [MeasureWinampDuration] will return the
current song position as a value between 0 and 1. You can use for example the BAR-meter to display
the value.
[MeasureWinampFull]
Measure=Plugin
Plugin=Plugins\WindowMessagePlugin.dll
WindowClass=Winamp v1.x
WindowMessage=1024 1 105
[MeasureWinampCurr]
Measure=Plugin
Plugin=Plugins\WindowMessagePlugin.dll
WindowClass=Winamp v1.x
WindowMessage=1024 0 105
[MeasureWinampDuration]
Measure=Calc
Formula=(MeasureWinampCurr<=0)?0:(MeasureWinampCurr/(MeasureWinampFull*1000+1))
Bangs:
Prev: !RainmeterPluginBang "MeasureWinamp SendMessage 273
40044 0"
Play: !RainmeterPluginBang "MeasureWinamp SendMessage 273 40045 0"
Pause: !RainmeterPluginBang "MeasureWinamp SendMessage 273 40046 0"
Stop: !RainmeterPluginBang "MeasureWinamp SendMessage 273 40047 0"
Next: !RainmeterPluginBang "MeasureWinamp SendMessage 273 40048 0"
Check the wa_ipc.h in WinampSDK for more messages values and their parameters.